//
//  WJCollectionViewFlowLayout.m
//  WJSelectedItemsDemo
//
//  Created by 王杰 on 2019/7/22.
//  Copyright © 2019 王杰. All rights reserved.
//
#define kScreenW [UIScreen mainScreen].bounds.size.width
#define kScreenH [UIScreen mainScreen].bounds.size.height
#import "WJCollectionViewFlowLayout.h"

@implementation WJCollectionViewFlowLayout

- (void)prepareLayout{
    
    [super prepareLayout];
    CGFloat width = (kScreenW/2) - 12;
    self.sectionHeadersPinToVisibleBounds = YES;
    self.sectionFootersPinToVisibleBounds = NO;
    self.itemSize = CGSizeMake(width, 40);
    self.minimumLineSpacing = 3;
    self.minimumInteritemSpacing = 1;
    //调节段间距
    self.sectionInset = UIEdgeInsetsMake(0, 10, 10, 10);
    self.headerReferenceSize = CGSizeMake(kScreenW, 55);
    self.footerReferenceSize = CGSizeMake(kScreenW, 55);
    self.sectionHeadersPinToVisibleBounds = NO;
    self.sectionInsetReference = UICollectionViewFlowLayoutSectionInsetFromContentInset;
    
    //    self
}


@end
